package com.example.teesystem.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 *
 * @TableName t_train_issue_relation
 */
@TableName(value ="t_train_issue_relation")
@Data
@NoArgsConstructor
public class TrainIssueRelation implements Serializable {
    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 进阶训练 id
     */
    @TableField(value = "ad_train_id")
    private Integer adTrainId;

    /**
     * 题目 id
     */
    @TableField(value = "issue_id")
    private Integer issueId;

    /**
     * 上传时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 逻辑删除位
     */
    @TableField(value = "is_delete")
    @TableLogic
    private Integer isDelete;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
    
    public TrainIssueRelation(Integer adTrainId, Integer issueId) {
        this.adTrainId = adTrainId;
        this.issueId = issueId;
    }
}
